﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainFrame.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<GPMS.Model.GraduationProject>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    AdminGPList
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>AdminGPList</h2>

<p>
    <%: Html.ActionLink("Create New", "Create", null, new { @class = "dialog" })%>
</p>
<table id="admingplist">
    <tr>
        <th>操作</th>
        <th>
            课题名称
        </th>
        <th>
            简介
        </th>
        <th>
            要求
        </th>
        <th>
            类别
        </th>
        <th>
            发布时间
        </th>
        <th>
            导师
        </th>
        <th>
            人数上限
        </th>
        <th>
            审核
        </th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.ActionLink("审核", "AdminAudit", new { id = item.GPID }, new { @class = "dialog" })%>
        </td>
        <td>
            <%: item.GPName %>
        </td>
        <td>
            <%: item.Description %>
        </td>
        <td>
            <%: item.Claim %>
        </td>
        <td>
            <%: item.Type %>
        </td>
        <td>
            <%: String.Format("{0:g}", item.CreateDate) %>
        </td>
        <td>
            <%: (ViewData["guider"] as Dictionary<Guid,string>)[item.GPID]%>
        </td>
        <td>
            <%: item.Maxman %>
        </td>
        <td>
            <%: item.Audit %>
        </td>
    </tr>  
<% } %>

</table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Header" runat="server">
  <link href="<%=Url.Content("~/Content/css/ui.jqgrid.css") %>" rel="Stylesheet" type="text/css" />
    <link href="<%=Url.Content("~/Content/css/admin.css") %>" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/i18n/grid.locale-cn.js") %>"></script>
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/jquery.jqGrid.min.js") %>"></script>
    <style type="text/css">
        body
        {
            background: white;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            tableToGrid($("#admingplist"), { width: 640, height: 320 });
            DialogLink($("a.dialog"), $("#dialogPanel"), { close: function () {
                $.unblockUI();
                //window.location.reload();
            }
            });
        });
        var reflashTag = {};
    </script>
</asp:Content>

